/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.cognition.util.j2me;

import com.cognition.util.marshal.JavaPrimitiveInputStream;
import com.cognition.util.marshal.JavaPrimitiveOutputStream;
import java.io.IOException;

/**
 *
 * @author richard
 */
public interface J2MESerializableOperations extends J2MESerializable{
    /**
     * Called whenever the class is to be serialized.  The method
     * is expected to fill the specified byte array output stream
     * with data.  The position of the stream to write to is already set and
     * should not be reset.
     */
    public void writeObject(JavaPrimitiveOutputStream s) throws IOException;

    /**
     * Deserialize a class from a byte array stream. The position of the
     * stream to read from is already set, and should not be reset.
     */
    public void readObject(JavaPrimitiveInputStream s) throws IOException;

}
